Field of the Invention
The present invention relates to an image processing apparatus, a control method therefor, a storage medium storing a control program therefor, and an image pickup apparatus, and in particular, relates to a technique that detects a luminance range subjected to gradation correction and suppresses contour correction intensity to the luminance range concerned.
Description of the Related Art
In general, there is an image pickup apparatus, such as a digital camera, that corrects a contour of an object within an image about image data obtained as a result of photographing. FIG. 8 is a block diagram showing a configuration of a conventional image processing apparatus that corrects a contour.
The image processing apparatus shown in FIG. 8 has a luminance signal generation unit 801, a contour correction unit 802, and a gamma correction unit 803. The luminance signal generation unit 801 generates a luminance signal on the basis of R (red), G (green), and B (blue) signals that show image data.
The contour correction unit 802 receives a luminance signal output from the luminance signal generation unit 801 and generates a contour correction gain amount according to a luminance amount that the luminance signal shows. Then, the contour correction unit 802 modulates and corrects the luminance signal (i.e., corrects a contour) according to the contour correction gain amount concerned, and outputs the luminance signal corrected by the contour correction.
The gamma correction unit 803 applies gamma correction to the luminance signal that was modulated and corrected, and outputs a gamma-corrected luminance signal.
Such an image processing apparatus is disclosed in Japanese Laid-Open Patent Publication (Kokai) No. 2008-103979 (JP 2008-103979A), for example.
However, when the image processing apparatus shown in FIG. 8 and the image processing apparatus disclosed in JP 2008-103979A correct a contour corrected by gradation correction, such as dodge correction, about image data, the contour is corrected without considering the luminance range subjected to the dodge correction. As a result of this, the suitable contour correction cannot be applied to the luminance range to which the dodge correction was applied.
Furthermore, there is a known technique that corrects a contour on the basis of dodge correction that is an example of gradation correction in order to achieve both an enlarged dynamic range and high image quality. FIG. 9 is a block diagram showing a configuration of a conventional image processing apparatus that corrects a contour on the basis of such dodge correction.
The image processing apparatus shown in FIG. 9 is provided with a dodge correction unit 901 in addition to the configuration in FIG. 8. The dodge correction unit 901 applies the dodge correction to the luminance signal output from the luminance signal generation unit 801. In this case, the dodge correction unit 901 gives a contour correction parameter generated according to a dodge parameter to the contour correction unit 802.
The gamma correction unit 803 applies the gamma correction to the luminance signal to which the dodge correction was applied, and sends the luminance signal corrected by the gamma correction to the contour correction unit 802. The contour correction unit 802 applies the contour correction to the luminance signal corrected by the gamma correction on the basis of the contour correction parameter, and outputs the luminance signal corrected by the contour correction.
Such an image pickup apparatus that determines the contour correction parameter on the basis of the dodge parameter used in the dodge correction and corrects the contour according to the contour correction parameter concerned is disclosed in Japanese Laid-Open Patent Publication (Kokai) No. 2007-228451 (JP 2007-228451A).
However, since the image processing apparatus shown in FIG. 9 and the image pickup apparatus disclosed in JP 2007-228451A generate the contour correction parameter on the basis of the dodge parameter, the contour correction will be uniformly applied to the entire image or each of divided areas. As a result, the suitable contour correction may not be applied to the luminance range to which the dodge correction was applied.